#ifndef PWM_S5_H
#define PWM_S5_H
#include <Arduino.h>
#include "DigitalOut.h"
#include "PwmOut.h"


class PwmSet
{
public:
    PwmSet(PinName r,PinName g,PinName b,PinName w,PinName y);
    ~PwmSet();

    PwmOut& red()
    {
        return _r;
    }
    PwmOut& green()
    {
        return _g;
    }
    PwmOut& blue()
    {
        return _b;
    }
    PwmOut& white()
    {
        return _w;
    }
    PwmOut& yellow()
    {
        return _y;
    }


private:
PwmOut _r;
PwmOut _g;
PwmOut _b;

PwmOut _w;
PwmOut _y;

};


class DioSet
{
public:
    DioSet(PinName r,PinName g,PinName b,PinName w,PinName y);
    ~DioSet();

    void output();

    DigitalOut& red()
    {
        return _dio_r;
    }
    DigitalOut& green()
    {
        return _dio_g;
    }
    DigitalOut& blue()
    {
        return _dio_b;
    }
    DigitalOut& white()
    {
        return _dio_w;
    }
    DigitalOut& yellow()
    {
        return _dio_y;
    }
private:

DigitalOut _dio_r;
DigitalOut _dio_g;
DigitalOut _dio_b;
DigitalOut _dio_w;
DigitalOut _dio_y;
};

class PwmS5
{
public:
    PwmS5(PinName r,PinName g,PinName b,PinName w,PinName y);
    ~PwmS5();

    PwmSet& pwm_set();
    DioSet& dio_set();
private:
PwmSet _pwm_set;
DioSet _dio_set;
};

#endif